﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace TestProject1.MainClasses
{
    public class Tickets
    {
        /*private int p_field;
        public int Field
        {
            get
            {
                return p_field;
            }
            private set
            {
                p_field = value;
            }
        }*/

        int id_ticket = 0;
        User owner = null;
        string date_must = "";
        string date_done = "";
        string status = "";
        User executor = null;
        Customer customer = null;
        Category category = null;

        public void SetID(int id) { this.id_ticket = id; }
        public void SetUser(User u) { this.owner = u; }
        public void SetDM(string dm) { this.date_must = dm; }
        public void SetDD(string dd) { this.date_done = dd; }
        public void SetStatus(string st) { this.status = st; }
        public void SetEx(User ex) { this.executor = ex; }
        public void SetCust(Customer cust) { this.customer = cust; }
        public void SetCat(Category cat) { this.category = cat; }

        public int GetID() { return this.id_ticket; }
        public User GetUser() { return this.owner; }
        public string GetDM() { return this.date_must; }
        public string GetDD() { return this.date_done; }
        public string GetStatus() { return this.status; }
        public User GetEx() { return this.executor; }
        public Customer GetCust() { return this.customer; }
        public Category GetCat() { return this.category; }


        public Tickets add(int id, string a1, string a2, string a3, User ex, Customer cust, Category cat)
        {
            this.id_ticket = id;
            this.date_must = a1;
            this.date_done = a2;
            this.status = a3;
            this.executor = ex;
            this.customer = cust;
            this.category = cat;
            return this;

        }
        public void del() { }
        public Tickets edit(int id, string a1, string a2, string a3, User ex, Customer cust, Category cat)
        {
            this.id_ticket = id;
            this.date_must = a1;
            this.date_done = a2;
            this.status = a3;
            this.executor = ex;
            this.customer = cust;
            this.category = cat;
            return this;
        }
        void selectTicketsByCategory() { }
        void selectTicketsByCustomer() { }
        void selectTicketsbyDate() { }
        void selectTicketsForPriorityCustomer() { }
        void selectTicketsForUser() { }

        public void start() { }

    }
}